// _Test1_LoadImage.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "highgui.h"	// openCV library

int _tmain(int argc, _TCHAR* argv[])
{

	// create an object image with path D:\\Field.jpg
	IplImage* image = cvLoadImage("D:\\Field.jpg");	

	// create a windows with name "Example1" with size as same as picture (default)
	cvNamedWindow("Example1",CV_WINDOW_AUTOSIZE);

	// show image in windows which name is "Example1"
	cvShowImage("Example1",image);

	// wait for input key, if argument different to 0, ie: wait(k), it will wait k miliseconds
	cvWaitKey(0);

	// deallocate, not mandatory but shoud do it
	cvReleaseImage(&image);
	cvDestroyWindow("Example1");

	return 0;
}

